/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.opensource.jdom.taggen.html.tag;

import org.opensource.jdom.taggen.Tag;

/**
 * Used to define a scripting language, such as JavaScript.
 *
 * <h2>Example</h2> <pre><code class="html">
 *<strong>&lt;script type="text/javascript" src="somescript.js"&gt;
 * &lt;/script&gt;</strong>
 *<strong>&lt;script type="text/javascript"&gt;</strong>
 *	function koala() {
 *		alert('KOALA! KOALA!');
 *	}
 *<strong>&lt;/script&gt;</strong>
 *</code></pre>
 *
 * @see Noscript
 * @author sergio.valdez
 */
public class Script extends Tag{

    /**
     * is used to specify what type of scripting language is used. This takes 
     * the form of a MIME type such as text/javascript.
     */
    private String type;
    /**
     * can be used to specify an external source of a script file.
     */
    private String src;
    /**
     * can be used to specify the character set of the element. 
     */
    private String charset;
    /**
     * can be used to specify that the script does not generate any document 
     * content so that the browser doesn't have to worry about it while the 
     * page loads. It must be used in the format defer="defer". 
     */
    private String defer;

    public Script(String type) {
        this.type = type;
    }

    /**
     * is used to specify what type of scripting language is used. This takes
     * the form of a MIME type such as text/javascript.
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * is used to specify what type of scripting language is used. This takes
     * the form of a MIME type such as text/javascript.
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * can be used to specify an external source of a script file.
     * @return the src
     */
    public String getSrc() {
        return src;
    }

    /**
     * can be used to specify an external source of a script file.
     * @param src the src to set
     */
    public void setSrc(String src) {
        this.src = src;
    }

    /**
     * can be used to specify the character set of the element.
     * @return the charset
     */
    public String getCharset() {
        return charset;
    }

    /**
     * can be used to specify the character set of the element.
     * @param charset the charset to set
     */
    public void setCharset(String charset) {
        this.charset = charset;
    }

    /**
     * can be used to specify that the script does not generate any document
     * content so that the browser doesn't have to worry about it while the
     * page loads. It must be used in the format defer="defer".
     * @return the defer
     */
    public String getDefer() {
        return defer;
    }

    /**
     * can be used to specify that the script does not generate any document
     * content so that the browser doesn't have to worry about it while the
     * page loads. It must be used in the format defer="defer".
     * @param defer the defer to set
     */
    public void setDefer(String defer) {
        this.defer = defer;
    }


}
